With the widespread use of social applications, a function of short-distance discovery becomes more important. Users want to learn, in a timely manner, that a friend appears around or leaves, so as to further establish short-distance communication with their friends.
In the prior art, a method for implementing short-distance discovery is performed based on an absolute position of a user. This method requires a user to report, in real time, a position of the user, for example, cell ID information or GPS position information of the user, to a certain location server in a network. The location server in the network calculates a distance between two users according to cell ID information or the GPS position information of devices of the two users, and if a certain condition is satisfied, determines that the two users fall within a “short-distance” range. For example, it is learned, according to cell ID information of two UEs, that the two UEs have a same cell ID, it is determined that the two users fall within a “short-distance” range; further, short-distance communication can be established between two short-distance devices.
The method for learning devices within a short-distance range according to a cell ID can implement short-distance discovery between devices, but cannot ensure precision of short-distance user discovery, which degrades experience of a user when using short-distance discovery.